package com.lagou.mapper;

import com.lagou.pojo.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IRoleMapper {

    /**
     * 根据uid获取Role
     * @param uid
     * @return
     */
    @Select("select * from user_role ur,role r where ur.user_id = #{uid} and r.id=ur.role_id")
    List<Role> findRoleByUid(int uid);



}
